import request from "@/config/axios";

//请求数据
export const gatewayTableDate = (data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/gatewayRoute/list?pageNo=${data.pageNo}&pageSize=${data.pageSize}`,
        method:"GET"
    }
)
//增加数据
export const updateAll = (data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/gatewayRoute/updateAll`,
        method:"POST",
        data
    }
)
//删除数据
export const deleteOne = (data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/gatewayRoute/delete?id=${data}`,
        method:"DELETE",
        data
    }
)
//定时任务请求数据 http://localhost:8080/jeecg-boot/sys/quartzJob/list?_t=1665989227&column=createTime&order=desc&field=id,,,jobClassName,cronExpression,parameter,description,status,action&pageNo=1&pageSize=10
export const quartzJob = () => request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/quartzJob/list?_t=1665989227&column=createTime&order=desc&field=id,,,jobClassName,cronExpression,parameter,description,status,action&pageNo=1&pageSize=10`,
        method:"GET",
    }
)
//启动暂停http://localhost:8080/jeecg-boot/sys/quartzJob/resume?_t=1666005872&jobClassName=%E4%BB%BB%E5%8A%A1%E7%B1%BB%E5%90%8D
export const quartzJobResume = (data) => request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/quartzJob/resume?&jobClassName=${data.jobClassName}`,
        method:"GET",
        data
    }
)
//立即执行http://localhost:8080/jeecg-boot/sys/quartzJob/execute?_t=1666069986&id=df26ecacf0f75d219d746750fe84bbee
export const quartzJobExecute = (data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/quartzJob/execute?id=${data.id}`,
        method:"GET",
        data
    }
)
//编辑接口http://localhost:8080/jeecg-boot/sys/quartzJob/edit
export const edit = (data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/quartzJob/edit`,
        method:"PUT",
        data
    }
)
//删除接口http://localhost:8080/jeecg-boot/sys/quartzJob/delete?id=1583033468788224001
export const deleteid = (data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/quartzJob/delete?id=${data.id}`,
        method:"DELETE",
        data
    }
)
//查询接口http://localhost:8080/jeecg-boot/sys/quartzJob/list?_t=1666338127&jobClassName=org.jeecg.modules.message.job.SendMsgJob&status=-1&column=createTime&order=desc&field=id,,,jobClassName,cronExpression,parameter,description,status,action&pageNo=1&pageSize=10
export const quartzJobliston =(data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/quartzJob/list?_t=1666338127&jobClassName=${data.jobClassName}&status=${data.status}&column=createTime&order=desc&field=id,,,jobClassName,cronExpression,parameter,description,status,action&pageNo=1&pageSize=10`,
        method:"GET",
        data
    }
)
//新增接口http://localhost:8080/jeecg-boot/sys/quartzJob/add
export const newaddall = (data) =>request({
    url:`http://localhost:8080/jeecg-boot/sys/quartzJob/add`,
    method:"POST",
    data
})

export const LogData=(data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/log/list?keyWord=${data.keyWord}&createTime_begin=${data.createTime_begin}&createTime_end=${data.createTime_end}&logType=${data.logType}&column=${data.column}&order=${data.order}&field=id,,,logContent,userid,username,ip,costTime,logType_dictText,operateType_dictText,createTime&pageNo=${data.logPageNo}&pageSize=${data.logPageSize}`,
        method:"GET"
    }
)
export const operationApi=(data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/log/list?keyWord=${data.keyWord}&createTime_begin=${data.createTime_begin}&createTime_end=${data.createTime_end}&logType=${data.logType}&column=${data.column}&operateType=${data.operateType}&order=${data.order}&field=id,,,logContent,userid,username,ip,costTime,logType_dictText,operateType_dictText,createTime&pageNo=${data.PageNo}&pageSize=${data.PageSize}`,
        method:"GET"
    }
)
